import Layout from '@/layout'

const tradeRouter = {
  path: '/trade',
  component: Layout,
  redirect: 'noRedirect',
  alwaysShow: true,
  name: 'Trade',
  meta: {
    title: '交易管理',
    icon: 'star',
    roles: ['admin', 'editor']
  },
  children: [
    {
      path: 'account-info-list',
      component: () => import('@/views/trade/account-info-list'),
      name: 'TradeAccountInfoList',
      meta: { title: '账户信息', icon: 'peoples', noCache: false }
    },
    {
      path: 'account-info-detail/:id(\\d+)',
      component: () => import('@/views/trade/account-info-detail'),
      name: 'TradeAccountInfoDetail',
      meta: { title: '账户信息详情', noCache: true, activeMenu: '/trade/account-info-list' },
      hidden: true
    },
    {
      path: 'api-list',
      component: () => import('@/views/trade/api-list'),
      name: 'TradeApiList',
      meta: { title: '接口信息', icon: 'table', noCache: false }
    },
    {
      path: 'api-detail/:id(\\d+)',
      component: () => import('@/views/trade/api-detail'),
      name: 'TradeApiDetail',
      meta: { title: '接口信息详情', noCache: true, activeMenu: '/trade/api-list' },
      hidden: true
    }
  ]
}

export default tradeRouter
